package com.zhentao.controller;

import com.zhentao.dto.LogShowDto;
import com.zhentao.result.Result;
import com.zhentao.service.SLogsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/logs")
public class LogController {
    @Resource
    private SLogsService logsService;
    @PostMapping("/getLogsAll")
    public Result getLogsAll(@RequestBody LogShowDto logShowDto) {
        return logsService.getLogsAll(logShowDto);
    }

    @DeleteMapping("/dels")
    public Result dels(Integer id){
        logsService.removeById(id);
        return Result.OK();
    }
}
